#include <iostream>
#include <iomanip>

using namespace std;

int main() {
    int int_num = 257;
    float pi = 3.1415926;
    cout << "不同进制输出：" << endl;
    cout << "十六进制：" << hex << int_num << " 八进制：" << oct << int_num << " 十进制：" << dec << int_num << endl;
    cout << "浮点数尾数显示：" << endl;
    cout << "默认有效位数6位：" << pi << "有效位数10：" << setprecision(10) << pi << endl;
    cout << "使用科学计数法保留小数点后5位:" << setiosflags(ios::scientific) << setprecision(5) << pi << endl;
    cout << "显示正负符号,输出位数20，不足用*替换:" << setiosflags(ios::showpos) << setfill('*') << setw(20) << pi << endl;
    cout << "左对齐：" << setw(20) << left << pi << endl;
    cout << "右对齐：" << setw(20) << right << pi << endl;
    cout << "居中对齐：" << noshowpos << setw(20) << internal << pi << endl;
    cout << "输出默认：" << pi << endl;

    return 0;
}